package Demo;

public class Demo05_Create {
    public static void main(String[] args) {
        Thread thread = new Thread(){
            public void run(){
                try {
                    Thread.sleep(1000);
                }catch (InterruptedException e){
                    e.printStackTrace();
                }
                System.out.println("通过Thread匿名内部类的方式创建线程");
            }
        };
        //启动线程
        thread.start();
    }
}
